This invention relates generally to the field of configuration and power management for computer systems, and specifically to the run-time modification of an Advanced Configuration and Power Management Interface ("ACPI") Machine Language ("AML") of a computer having an ACPI enabled operating system("OS").
ACPI is a specification jointly developed and released to the public by Microsoft, Intel, and Toshiba. It defines an extensible means by which an Operating System ("OS") can be given greater control over the power management and resource management in future computer systems, such as PCs. ACPI defines a hardware and software interface by which an OS can manipulate the characteristics of motherboard devices. This technology differs from existing Basic Input/Output System ("BIOS") technologies in at least two regards:: (i) the BIOS support code is written in a p-code called ACPI Machine Language ("AML"), discussed further herein, rather than in the native assembly language of a platform; and (ii) the BIOS support code does not determine the policies or time-outs for power or resource management. Rather, these policies are determined by the operating system.
The ACPI hardware interface provides functionality to the OS in two categories (i) control/detection of system control events using a normal interrupt called System Control Interrupt ("SCI"), rather than a System Management Interrupt ("SMI"), and control of the system power state. The details of a platform's support for the hardware interface are provided in a set of well-defined tables within the system BIOS.
The ACPI software interface provides the means for the OS to find the different tables in the system BIOS and means for the OS to understand and control the characteristics of the motherboard devices using AML. The AML resides in the tables within the system BIOS.
ACPI Source Language ("ASL") provides the mechanism by which the OS controls power management, Plug n' Play and docking support under the latest releases of, for example, the Windows and Windows NT operating systems that are required to be ACPI compliant. The ASL is compiled during the BIOS build process into AML. As described above, AML is a pseudo-code assembly language that is interpreted by an OS driver.
AML is the ACPI control method virtual machine language, a machine code for a virtual machine which is supported by an ACPI-compatible OS. ACPI control methods can be written in AML, but programmers ordinarily code the control methods in ASL.
AML is the language processed by the ACPI method interpreter. It is primarily a declarative language and provides a set of declarations that is compiled by the ACPI interpreter into the ACPI name space at definition block load time. AML and ASL are different languages although they are closely related. All ACPI-compatible OS's must support AML. However, a given user can define any arbitrary source language, rather than ASL, together with a conversion tool (a translator) to generate the corresponding AML.
One of the requirements of AML is that its access to memory, I/O, and PCI configuration space are either static or else the capabilities provided for dynamic values are so limited as to be largely useless because they are:
(a) evaluated at the time when the AML is first loaded by the OS; and PA1 (b) are very difficult to modify at that point. PA1 Performance sensitive features. PA1 Features that drivers require during wakeup. PA1 Features that enable catastrophic failure recovery. PA1 Abstracts the hardware from the ACPI driver. PA1 Buffers OEM code from the different OS implementations.
In particular, there are at least two objects where the ability to modify the object's parameters are desirable:
Processor and OperationRegion. In general, OperationRegion (name, type, offset, length) provides the ASL code access to a chunk of memory, I/O space, PCI configuration space, embedded controller space, or SMBus space. However, although "offset" and "length" are expressions, they are only evaluated at the time when the OS loads the ACPI tables and is, therefore, difficult to modify based on changed conditions in the system, such as, when the I/O addresses are relocated by the Motherboard Configurable Devices/Plug and Play routines("MCD/PnP") or the jumper settings on the motherboard.
The ACPI Processor (name, APICID, offset, length) object declares a CPU and its power management control I/O ports to the OS. The "offset" and "length" are not expressions and, therefore, must be located at build time. This is extremely limiting, especially, if it is desired to relocate these I/O addresses using, for example, MCD/PnP.
Another problem arises because, in a system BIOS, users can enter the Setup program to modify the settings of motherboard integrated peripherals. The settings often include, for example, the device's default resource settings (I/O, IRQ, etc.), whether the device is enabled or disabled, and whether the OS is allowed to modify the device's settings at run-time.
In a legacy resource management system, such as PnP, these settings control the information that the run-time services return to the OS. Under ACPI, however, there are certain new problems that make this type of integration more difficult.
1. The OS no longer calls the PnP run-time services.
2. The ASL code (which replaces the PnP run-time calls) cannot access the CMOS to determine the user settings.
3. The OS assumes that if the .sub.-- DIS (Disable) method exists for a device, calling it will disable the device. However, this can conflict with a user setting that specifies the device as being secured, and hence not changeable by the OS in this manner.
4. The OS assumes that if the .sub.-- PRS (Possible Resource Settings) object is found under a device, then the device must support multiple configurations even if the users setting indicates otherwise. Therefore, the OS can modify the resource settings in a manner inconsistent with a user's indicated preference using the Setup program.
The following subsections provides an overview of the ACPI architecture that facilitates a better understanding of the present invention which is summarized in the following section titled "Summary of the Invention."